<html>
<%
	String username = request.getParameter("username");
	String password = request.getParameter("password");

	System.out.println("Username > " + username);
	System.out.println("Password > " + password);

	if (username.equals("admin") && password.equals("1234")) {

		System.out.println("Login Finish !!!");

		// Same Map key, value
		session.setAttribute("loginUsername", username);

		request.setAttribute("requestAttr", "Test Request Attribute");
		session.setAttribute("sessionAttr", "Test Session Attribute");
		getServletContext().setAttribute("contextAttr",	"Test Context Attribute");

// 		response.sendRedirect("../page/welcome.jsp");

		RequestDispatcher view = request.getRequestDispatcher("../page/welcome.jsp");
		view.forward(request, response);
		
	} else {

		System.out.println("Login Fail !! > ");
		response.sendRedirect("../../"+request.getContextPath());
	}
%>
</html>
